<%@page import="com.sinba.common.business.dto.MatchGridDTO"%>
<%@page import="com.sinba.common.business.dto.MatchQueryDTO"%>
<%@page import="com.sinba.common.dto.PageDTO"%>
<%@page import="com.sinba.common.business.service.IMatchService"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="../language.jsp" %>
<%
if(session.getAttribute("password2")==null){
	/* response.sendRedirect( "login2.jsp?pageUrl=user/sureRemittance.jsp?id="+request.getParameter("id"));
	return; */
}
Long id = 0L;
if(request.getParameter("id")!=null && Long.parseLong(request.getParameter("id"))>0){
	id = Long.parseLong(request.getParameter("id"));
}
ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
IMatchService matchService = (IMatchService)ac.getBean("matchService");
MatchQueryDTO queryDTO = new MatchQueryDTO();
queryDTO.setId(id);
PageDTO dto = matchService.findMatchPage(queryDTO, null, null);
MatchGridDTO matchGridDTO = new MatchGridDTO();
if(dto!=null && dto.getTotalSize()>0){
	matchGridDTO = (MatchGridDTO)dto.getData().get(0);
	if(matchGridDTO.getStatus()!=0 && matchGridDTO.getStatus()!=3){
		response.sendRedirect( "matchBuy.jsp");
	}
}else{
	response.sendRedirect( "matchBuy.jsp");
	return;
}
request.setAttribute("matchGridDTO",matchGridDTO);


%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><fmt:message key="i18n.accountZhuanZhang"/>-<fmt:message key="i18n.title"/> </title>
<link rel="shortcut icon" href="../index/favicon.png" />
<link href="../skin/skin1/css/subPage.css" rel="stylesheet">
<link rel="stylesheet" href="css/sub_page_main_style.css" />
</head>
<body style="background:#ede3d1;height:800px;">
	<div class="account">
	<div class="top">交易管理 &gt; 确认汇款</div>
	<!-- <div class="left"></div> -->
    <div class="right" style="margin: 0px;">
      <form action="match!payment.action" id="confirmRemittance_form" method="post" enctype="multipart/form-data">
	 	<input type="hidden" name="pageUrl" value="sureRemittance.jsp" />
	 	<input type="hidden" name="matchDTO.id" value="${param.id}" />
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        	
        	<tr>
				<td align="right" width="15%">
					<p>
						<fmt:message key="i18n.transfer.Info" />
					</p> 
				</td>
				<td align="left" width="35%">
					<fmt:message key="i18n.remittanceMoney" />：${matchGridDTO.matchMoney}<br>
					<fmt:message key="i18n.transfer.acceptUser" />：${matchGridDTO.sellUser }<br>
					<fmt:message key="i18n.payeeName" />：${matchGridDTO.sellUserName }<br>
					<fmt:message key="i18n.paymentMethod" />：${matchGridDTO.sellUserBankType }<br>
				    <fmt:message key="i18n.receiveAccount" />：${matchGridDTO.sellUserBankAccount }<br>
				       <fmt:message key="i18n.transfer.acceptUserPhone" />：${matchGridDTO.sellUserBankPhone }<br>
				</td>
			</tr>
			<tr>
				<td align="right" width="15%">
					<p>
						凭证图片
					</p> 
				</td>
				<td align="left" width="35%" style="font-weight: 200">
					<input type="file" name="imgUrl"/>
					(支持格式：jpeg jpg bmp png)
				</td>
			</tr>
			<tr>
				<td align="right" width="15%">
					<p>
						留言
					</p> 
				</td>
				<td align="left" width="35%" style="font-weight: 600">
					<textarea rows="5" cols="50" name="matchDTO.message" style="border: 1px solid;"></textarea>
				</td>
			</tr>
			<tr>
				<td align="right" width="15%"></td>
				<td align="left" width="35%" style="font-weight: 600"><input type="button" class="ty_an" onclick="confirmSubmit()" value="<fmt:message key="i18n.confirmRemittance"/>"></td>
			</tr>
		</table>
	</form>
    </div>
  </div>
  
<script type="text/javascript" src="../scripts/jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
function confirmSubmit(){
	if(confirm('确认已汇款给收款方吗?')){
		$('#confirmRemittance_form').submit();
	}
}
</script>
</body>
</html>